import { OptionType } from '../user/type'

export interface CoursePageQuery {
  pageNum: number
  pageSize: number
  keywords?: string
  status?: boolean
  semesterId?: number
}

export interface CourseSemesterType {
  classroom: string
  week: string
  classNumber: number
}

export interface CourseType {
  courseId: number
  courseName: string
  courseCode: string
  teacher: OptionType
  credit: number
  department: string
  description: string
  maxNum: number
  num: number
  status: boolean
  createTime: string
  updateTime: string
  semester: OptionType
  schedule: CourseSemesterType[]
  enrollmentId: number
}

export interface CoursePageRes {
  list: CourseType[]
  total: number
}

export interface CourseParams {
  courseId?: number
  courseName: string
  courseCode: string
  teacherId: number | undefined
  credit: number
  department: string
  description: string
  maxNum: number
  semesterId: number | undefined
}

export interface SelectCourseParams {
  studentId: number
  courseIds: number[]
}

export interface WithdrawCourseParams {
  enrollmentIds: number[]
}
